$(document).ready(function(){
	//登录弹出层
	$(".register").mouseover(function(){
		$(".register_menu").css("display","block");								   
	});	
	$(".register").mouseout(function(){
		$(".register_menu").css("display","none");								   
	});	
	
	//用户弹出层
	$(".user_avatar").mouseover(function(){
		$(".user_menu").css("display","block");								   
	});	
	$(".user_avatar").mouseout(function(){
		$(".user_menu").css("display","none");								   
	});			
	

});

var w = document.body.clientWidth;
	var y_left =(w-958)/2;
	var yy_left =(w-914)/2;
	$(".section").css("left",y_left+"px");
	$(".popup_main").css("left",yy_left+"px");
	$(".release_main").css("left",yy_left+"px");
	
	//---------颜色对比开启
	function section_open(){
		$("#bgk").css("display","block");
		$(".section").css("display","block");
	};
	//---------颜色对比关闭
	function section_close(){
		$("#bgk").css("display","none");
		$(".section").css("display","none");
	};
	//---------上传图片开启
	function upload_open(){
		$("#popup").css("display","block");
		$(".pm_c").css("display","none");
		$(".pm_a").css("display","block");
	}; 
	//---------上传图片关闭
	function upload_close(){
		$("#popup").css("display","none");
		$(".pm_a").css("display","none");
	}; 
	//---------开始上传开启
	function release_open(){
		$("#popup").css("display","block");
		$(".release_main").css("display","block");
		$(".popup_main").css("display","none");
	}; 
	//---------开始上传关闭
	function release_close(){
		$("#popup").css("display","none");
		$(".release_main").css("display","none");
		$(".popup_main").css("display","none");
	};
	//---------发布图片开启
	function succeed_open(){
		$("#popup").css("display","block");	
		$(".release_main").css("display","none");
		$(".pm_b").css("display","block");
	}; 
	//---------发布图片关闭
	function succeed_close(){
		$("#popup").css("display","none");
		$(".pm_b").css("display","none");
	};
	//---------发布图片2开启
	function congrats_open(){
		$("#popup").css("display","block");
		$(".release_main").css("display","none");
		$(".pm_c").css("display","block");
	}; 
	//---------发布图片2关闭
	function congrats_close(){
		$("#popup").css("display","none");
		$(".pm_c").css("display","none");
	};
	
	//新浪登录
function sina_login()
{
	location.href="http://local.iknowy.com/lib/apilogin/sinat/index.php?sinatbackurl=" + encodeURIComponent(location.href);	
	return false;
}

//QQ登录
function qq_login()
{
	window.open("http://local.iknowy.com/lib/apilogin/qqlogin/oauth/redirect_to_login.php?qqbackurl="+ encodeURIComponent(location.href),"_self");
	return false;
} 
	
	